﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubbo.Config.Api
{
    public abstract class AbstractReferenceConfig : AbstractInterfaceConfig
    {
        // 检查服务提供者是否存在
        public bool? IsCheck { get; set; }

        // 是否加载时即刻初始化
        public bool? IsInit { get; set; }

        // 是否使用泛接口
        public string Generic { get; set; }
        public bool IsGeneric
        {
            get
            {
                //return ProtocolUtils.isGeneric(generic);
                return bool.Parse(Generic);
            }
        }

        // 优先从JVM内获取引用实例
        protected bool? injvm;

        // lazy create connection
        protected bool? Lazy { get; set; }

        protected string reconnect;

        protected bool? Sticky { get; set; }

        //stub是否支持event事件. //TODO slove merge problem 
        protected bool? stubevent;//= Constants.DEFAULT_STUB_EVENT;

        // 版本
        protected string Version { get; set; }

        // 服务分组
        protected string Group { get; set; }
    }
}
